package com.kk.factory.abstractfactory;


/**
 * @author 王志强
 * @date 2021-12-10
 */
public class TJFactory implements IFactory {


    @Override
    public AbstractPizza createPizza(String type) {

        AbstractPizza pizza = null;
        if ("cheese".equals(type)) {
            pizza = new TJCheesePizza();
        } else {
            System.out.println("天津没有pizza: " + type);
        }
        return pizza;
    }
}
